using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools._Configuration._LRSEvent
{
    /// <summary>
    /// <para>Create LRS Event</para>
    /// <para>Creates line or point events for an existing LRS Network.</para>
    /// <para>为现有 LRS 网络创建线或点事件。</para>
    /// </summary>    
    [DisplayName("Create LRS Event")]
    public class CreateLRSEvent : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateLRSEvent()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_parent_network">
        /// <para>Parent LRS Network</para>
        /// <para>The network to which the event is registered.</para>
        /// <para>事件注册到的网络。</para>
        /// </param>
        /// <param name="_event_name">
        /// <para>Event Name</para>
        /// <para>The event to be registered.</para>
        /// <para>要注册的事件。</para>
        /// </param>
        /// <param name="_geometry_type">
        /// <para>Geometry Type</para>
        /// <para><xdoc>
        ///   <para>The geometry type of the output event.</para>
        ///   <bulletList>
        ///     <bullet_item>Point—The geometry type of the event is Point. This is the default.</bullet_item><para/>
        ///     <bullet_item>Line—The geometry type of the event is Polyline.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出事件的几何类型。</para>
        ///   <bulletList>
        ///     <bullet_item>点 （Point） - 事件的几何类型为点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>线 - 事件的几何类型为折线。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_event_id_field">
        /// <para>Event ID Field</para>
        /// <para>The event ID field available in the event feature class.</para>
        /// <para>事件要素类中可用的事件 ID 字段。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route ID Field</para>
        /// <para>Name of the route ID field if it is a point event that does not span routes, or from route ID field if the event spans routes. The field is available in the event feature class.</para>
        /// <para>如果路径 ID 字段是不跨路径的点事件，则为路径 ID 字段的名称，如果事件跨越路径，则为路径 ID 字段的名称。该字段在事件要素类中可用。</para>
        /// </param>
        /// <param name="_from_date_field">
        /// <para>From Date Field</para>
        /// <para>The from date field available in the event feature class.</para>
        /// <para>事件要素类中可用的起始日期字段。</para>
        /// </param>
        /// <param name="_to_date_field">
        /// <para>To Date Field</para>
        /// <para>The to date field available in the event feature class.</para>
        /// <para>事件要素类中可用的截至日期字段。</para>
        /// </param>
        /// <param name="_loc_error_field">
        /// <para>Location Error Field</para>
        /// <para>The location error field available in the event feature class.</para>
        /// <para>事件要素类中可用的位置错误字段。</para>
        /// </param>
        /// <param name="_measure_field">
        /// <para>Measure Field</para>
        /// <para>Name of the measure field if it is a point event or from measure field if it is a line event.</para>
        /// <para>度量字段的名称（如果是点事件）或测量字段的名称（如果是线事件）。</para>
        /// </param>
        public CreateLRSEvent(object _parent_network, object _event_name, _geometry_type_value _geometry_type, object _event_id_field, object _route_id_field, object _from_date_field, object _to_date_field, object _loc_error_field, object _measure_field)
        {
            this._parent_network = _parent_network;
            this._event_name = _event_name;
            this._geometry_type = _geometry_type;
            this._event_id_field = _event_id_field;
            this._route_id_field = _route_id_field;
            this._from_date_field = _from_date_field;
            this._to_date_field = _to_date_field;
            this._loc_error_field = _loc_error_field;
            this._measure_field = _measure_field;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Create LRS Event";

        public override string CallName => "locref.CreateLRSEvent";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_parent_network, _event_name, _geometry_type.GetGPValue(), _event_id_field, _route_id_field, _from_date_field, _to_date_field, _loc_error_field, _measure_field, _to_measure_field, _event_spans_routes.GetGPValue(), _to_route_id_field, _store_route_name.GetGPValue(), _route_name_field, _to_route_name_field, _out_feature_class];

        /// <summary>
        /// <para>Parent LRS Network</para>
        /// <para>The network to which the event is registered.</para>
        /// <para>事件注册到的网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Parent LRS Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _parent_network { get; set; }


        /// <summary>
        /// <para>Event Name</para>
        /// <para>The event to be registered.</para>
        /// <para>要注册的事件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _event_name { get; set; }


        /// <summary>
        /// <para>Geometry Type</para>
        /// <para><xdoc>
        ///   <para>The geometry type of the output event.</para>
        ///   <bulletList>
        ///     <bullet_item>Point—The geometry type of the event is Point. This is the default.</bullet_item><para/>
        ///     <bullet_item>Line—The geometry type of the event is Polyline.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出事件的几何类型。</para>
        ///   <bulletList>
        ///     <bullet_item>点 （Point） - 事件的几何类型为点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>线 - 事件的几何类型为折线。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geometry Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _geometry_type_value _geometry_type { get; set; }

        public enum _geometry_type_value
        {
            /// <summary>
            /// <para>Point</para>
            /// <para>Point—The geometry type of the event is Point. This is the default.</para>
            /// <para>点 （Point） - 事件的几何类型为点。这是默认设置。</para>
            /// </summary>
            [Description("Point")]
            [GPEnumValue("POINT")]
            _POINT,

            /// <summary>
            /// <para>Line</para>
            /// <para>Line—The geometry type of the event is Polyline.</para>
            /// <para>线 - 事件的几何类型为折线。</para>
            /// </summary>
            [Description("Line")]
            [GPEnumValue("LINE")]
            _LINE,

        }

        /// <summary>
        /// <para>Event ID Field</para>
        /// <para>The event ID field available in the event feature class.</para>
        /// <para>事件要素类中可用的事件 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _event_id_field { get; set; }


        /// <summary>
        /// <para>Route ID Field</para>
        /// <para>Name of the route ID field if it is a point event that does not span routes, or from route ID field if the event spans routes. The field is available in the event feature class.</para>
        /// <para>如果路径 ID 字段是不跨路径的点事件，则为路径 ID 字段的名称，如果事件跨越路径，则为路径 ID 字段的名称。该字段在事件要素类中可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>From Date Field</para>
        /// <para>The from date field available in the event feature class.</para>
        /// <para>事件要素类中可用的起始日期字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_date_field { get; set; }


        /// <summary>
        /// <para>To Date Field</para>
        /// <para>The to date field available in the event feature class.</para>
        /// <para>事件要素类中可用的截至日期字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_date_field { get; set; }


        /// <summary>
        /// <para>Location Error Field</para>
        /// <para>The location error field available in the event feature class.</para>
        /// <para>事件要素类中可用的位置错误字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Location Error Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _loc_error_field { get; set; }


        /// <summary>
        /// <para>Measure Field</para>
        /// <para>Name of the measure field if it is a point event or from measure field if it is a line event.</para>
        /// <para>度量字段的名称（如果是点事件）或测量字段的名称（如果是线事件）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _measure_field { get; set; }


        /// <summary>
        /// <para>To Measure Field</para>
        /// <para>Name of the to measure field. Required only for Line events.</para>
        /// <para>要测量字段的名称。仅对 Line 事件是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Measure Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _to_measure_field { get; set; } = null;


        /// <summary>
        /// <para>Event Spans Routes</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the event records spans routes.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The event records span routes.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The event records do not span routes. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定事件记录是否跨路由。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 事件记录跨路径。</bullet_item><para/>
        ///     <bullet_item>未选中 - 事件记录不跨越路径。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Spans Routes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _event_spans_routes_value _event_spans_routes { get; set; } = _event_spans_routes_value._false;

        public enum _event_spans_routes_value
        {
            /// <summary>
            /// <para>NO_SPANS_ROUTES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SPANS_ROUTES")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>SPANS_ROUTES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SPANS_ROUTES")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>To Route ID Field</para>
        /// <para>Name of the to route ID field. Required only if the geometry type is a line and the Event Spans Routes check box is checked.</para>
        /// <para>“到路由 ID”字段的名称。仅当几何类型为直线且选中“事件跨度路径”（Event Spans Routes） 复选框时，才需要。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _to_route_id_field { get; set; } = null;


        /// <summary>
        /// <para>Store Route Name</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the route name should be stored with the event records.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Stores route name with the event records.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Does not store route name with the event records. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否应将路由名称与事件记录一起存储。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将路径名称与事件记录一起存储。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不存储路径名称和事件记录。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store Route Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _store_route_name_value _store_route_name { get; set; } = _store_route_name_value._false;

        public enum _store_route_name_value
        {
            /// <summary>
            /// <para>NO_STORE_ROUTE_NAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_STORE_ROUTE_NAME")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>STORE_ROUTE_NAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("STORE_ROUTE_NAME")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Route Name Field</para>
        /// <para>The route name field if it is a point event that does not span routes, or the from route name field if it is a line event that spans routes. Required if Store Route Name is checked.</para>
        /// <para>如果是不跨越路径的点事件，则为路径名称字段，如果是跨路径的线事件，则为从路径名称字段。如果选中了存储路由名称，则为必需。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _route_name_field { get; set; } = null;


        /// <summary>
        /// <para>To Route Name Field</para>
        /// <para>The to route name field for line events that span routes. Required if Store Route Name is checked.</para>
        /// <para>跨路由的线事件的 to route name 字段。如果选中了存储路由名称，则为必需。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Route Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _to_route_name_field { get; set; } = null;


        /// <summary>
        /// <para>Output Event Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Event Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public CreateLRSEvent SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}